<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/6/23
 * Time: 9:31
 */

namespace app\common\model\media;


use app\common\model\TimeModel;

class Articles extends TimeModel
{
    protected $deleteTime = 'delete_time';

    public function setImageAttr($value){
        return implode(',',$value);
    }
    public function getImageAttr($value){
        return explode(',',$value);
    }

    public function getContentAttr($value){
        return htmlspecialchars_decode($value);
    }
    /**
     * 关联用户
     */
    public function Store(){
        return $this->belongsTo('app\common\model\mall\Store','store_id','id')->field('id,name');
    }
}